package com.hzit.client;

import com.hzit.entity.User;
import com.hzit.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

/**
 * @FeignClient(value = "hzit-user",fallback = UserClientHandler.class)  熔断器处理第一种方法
 *
 * */
@FeignClient(value = "hzit-user",fallbackFactory = UserClientFactory.class)
public interface UserClient {

    //查看所有用户列表
    @GetMapping("/user/list")
    R<List<User>> list();

    //获取端口、号
    @GetMapping("/user/getPort")
    R getPort();
}
